<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            display:flex;
            justify-content: center;
            align-items: center;
        }
        .shell{
            display:flex;
            justify-content: center;
            align-items: center;
            width: 400px;
            height: 400px;
            border:10px solid gray;
            transform: perspective(900px) rotateY(45deg);
            transform-style: preserve-3d;
        }
        .shell div{
            width: 200px;
            height: 200px;
            left: 50%;
            top:50%;
            background-color: aqua;
            transform: perspective(900px)  ;
            transition: 3s;
        }
        .shell:hover div{
            transform: perspective(900px) rotateZ(400deg) ;
        }

    </style>
</head>
<body>
    <div class="shell">
        <div></div>
    </div>
</body>
</html>